package core.util;

public class UserSessionData
{
    private int displayNumber;

    private String displayText;

    private MyCookieValue cookieValue;

    private long lastActiveTime;

    public UserSessionData( int displayNumber, String displayText,
            MyCookieValue cookieValue ) {
        this.displayNumber = displayNumber;
        this.displayText = displayText;
        this.lastActiveTime = System.currentTimeMillis();
        this.cookieValue = cookieValue;
    }

    public int getDisplayNumber() {
        return displayNumber;
    }

    public String getDisplayText() {
        return displayText;
    }

    public long getLastActiveTime() {
        return lastActiveTime;
    }

    public void setLastActiveTime( long lastActiveTime ) {
        this.lastActiveTime = lastActiveTime;
    }

    public void increaseDisplayNumber() {
        displayNumber++;
    }

    public MyCookieValue getCookieValue() {
        return cookieValue;
    }

    public void setCookieValue( MyCookieValue val ) {
        this.cookieValue = val;
    }

    @Override
    public String toString() {
        String format = "%s/%s/%s";
        return String.format( format, displayNumber, displayText,
                lastActiveTime );
    }
}
